import Home from '@/auth/pages/Home'

const processRoute = [
  {
    path: 'procedure-control',
    name: 'procedure-control',
    meta: {
      title: '过程管控'
    },
    component: () => import('@/views/DynamicControl/process-control')
  },
  {
    path: 'procedure-control/detail/:id',
    name: 'procedure-control-detail',
    meta: {
      title: '管控落实详情',
      notCache: true
    },
    props: true,
    component: () => import('@/views/DynamicControl/process-control/detail.vue')
  },
  {
    path: 'procedure-control/edit/:id',
    name: 'procedure-control-edit',
    meta: {
      title: '管控结果登记'
    },
    props: true,
    component: () => import('@/views/DynamicControl/process-control/edit.vue')
  }
]

export default {
  path: '/dynamic-control',
  name: 'dynamic-control',
  meta: {
    icon: 'logo-chrome',
    title: '动态管控'
  },
  component: Home,
  children: [
    {
      path: 'monthly-dynamics',
      name: 'monthly-dynamics',
      meta: {
        title: '每月动态'
      },
      component: () => import('@/views/DynamicControl/monthly-dynamics.vue')
    },
    {
      // 下月动态新增
      path: 'add-dynamics/:type/:id/:name',
      name: 'dynamics-add',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/DynamicControl/dynamics-monthly/add.vue')
    },
    {
      // 修改动态
      path: 'edit-dynamics/:id',
      name: 'dynamics-edit',
      meta: {
        title: '下月动态编辑',
        notCache: false
      },
      component: () => import('@/views/DynamicControl/edit-monthly/editMon')
    },
    {
      //配置
      path: 'monthly-dynamics-dispose/:type/:id/:name',
      name: 'monthly-dynamics-dispose',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () =>
        import('@/views/DynamicControl/monthly-dynamics-dispose.vue')
    },
    {
      //详情
      path: 'monthly-dynamics-detail/:type/:id/:name',
      name: 'monthly-dynamics-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () =>
        import('@/views/DynamicControl/monthly-dynamics-detail.vue')
    },
    /*{
      //签发--审核
      path: 'monthly-issue-examine/:type/:id/:name',
      name: 'monthly-issue-examine',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () =>
        import('@/views/DynamicControl/monthly-issue-examine.vue')
    }*/
    {
      //签发
      path: 'monthly-issue/:type/:id/:name',
      name: 'monthly-issue',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/DynamicControl/monthly-issue.vue')
    },
    {
      //审核
      path: 'monthly-examine/:type/:id/:name',
      name: 'monthly-examine',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/DynamicControl/monthly-examine.vue')
    },
    {
      //接受
      path: 'monthly-accept/:type/:id/:name',
      name: 'monthly-accept',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/DynamicControl/monthly-accept.vue')
    },
    {
      //修订
      path: 'monthly-revise/:type/:id/:name',
      name: 'monthly-revise',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/DynamicControl/monthly-revise.vue')
    },
    ...processRoute
  ]
}
